package MsgSystem;

import UserUnit.ImpPhoto;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class ImpSearchResult implements SearchResult, Serializable {

    private static final Log LOGGER = LogFactory.getLog(ImpInstantMessage.class);
    ArrayList<ImpPhoto> resultContent = null;
    String messageType;
    //This function fill the HashMap with the results of the query

    public ImpSearchResult(ArrayList resultContent, String messageType) {
        this.resultContent = resultContent;
        this.messageType = messageType;
    }

    public void setSearchResults(ArrayList resultContent) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Results of the search ready");
        }
        this.resultContent = resultContent;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }
    //This function returns the HashMap with the results of the query

    public ArrayList getSearchResults() {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Results of the search sended");
        }
        return resultContent;
    }

    public String getMessageType() {
        return messageType;
    }
}
